const admin = require('../models/admin');
const user = require('../models/user');
const column = require('../models/column');
const article = require('../models/article');
const tab = require('../models/tab');
const comment = require('../models/comment');
const menu = require('../models/menu');
const role = require('../models/role');


// 管理员数据
let adminJson = [
    { "username": "admin1", "nickname": "管理员1", "password": "21232f297a57a5a743894a0e4a801fc3", "email": "1@qq.com", "phone": "18888888888" },
    { "username": "admin2", "nickname": "管理员2", "password": "21232f297a57a5a743894a0e4a801fc3", "email": "2@qq.com", "phone": "18888888888" },
    { "username": "admin3", "nickname": "管理员3", "password": "21232f297a57a5a743894a0e4a801fc3", "email": "3@qq.com", "phone": "18888888888" },
    { "username": "admin4", "nickname": "管理员4", "password": "21232f297a57a5a743894a0e4a801fc3", "email": "4@qq.com", "phone": "18888888888" },
    { "username": "admin5", "nickname": "管理员5", "password": "21232f297a57a5a743894a0e4a801fc3", "email": "5@qq.com", "phone": "18888888888" },
]
// 会员数据
let memberJSON = [
    { "username": "user1", "nickname": "会员1", "password": "user", "sex": 0, "email": "1@qq.com", "birthday": "1994-1-1", "phone": "18888888888" },
    { "username": "user2", "nickname": "会员2", "password": "user", "sex": 1, "email": "2@qq.com", "birthday": "1994-1-1", "phone": "18888888888" },
    { "username": "user3", "nickname": "会员3", "password": "user", "sex": 0, "email": "3@qq.com", "birthday": "1994-1-1", "phone": "18888888888" },
    { "username": "user4", "nickname": "会员4", "password": "user", "sex": 1, "email": "4@qq.com", "birthday": "1994-1-1", "phone": "18888888888" },
    { "username": "user5", "nickname": "会员5", "password": "user", "sex": 1, "email": "5@qq.com", "birthday": "1994-1-1", "phone": "18888888888" },
]
// 栏目数据
let columnJSON = [
    { "name": "栏目1", "link": "column1", "keyword": "栏目1", "description": "描述栏目1" },
    { "name": "栏目2", "link": "column2", "keyword": "栏目2", "description": "描述栏目2" },
    { "name": "栏目3", "link": "column3", "keyword": "栏目3", "description": "描述栏目3" },
    { "name": "栏目4", "link": "column4", "keyword": "栏目4", "description": "描述栏目4" },
    { "name": "栏目5", "link": "column5", "keyword": "栏目5", "description": "描述栏目5" }
]
// 文章数据
let articleJSON = [
    { "title": "文章1", "author": "管理员", "image": "", "cid": "1", "cname": "栏目1", "intro": "文章1", "content": "文章1", "keyword": "文章1", "views": "100" },
    { "title": "文章2", "author": "管理员", "image": "", "cid": "2", "cname": "栏目2", "intro": "文章2", "content": "文章2", "keyword": "文章2", "views": "100" },
    { "title": "文章3", "author": "管理员", "image": "", "cid": "3", "cname": "栏目3", "intro": "文章3", "content": "文章3", "keyword": "文章3", "views": "100" },
    { "title": "文章4", "author": "管理员", "image": "", "cid": "4", "cname": "栏目4", "intro": "文章4", "content": "文章4", "keyword": "文章4", "views": "100" },
    { "title": "文章5", "author": "管理员", "image": "", "cid": "5", "cname": "栏目5", "intro": "文章5", "content": "文章5", "keyword": "文章5", "views": "100" }
]
// 标签数据
let tabJSON = [
    { "name": "标签1" },
    { "name": "标签2" },
    { "name": "标签3" },
    { "name": "标签4" },
    { "name": "标签5" }
]
// 评论数据
let commentJSON = [
    { "user_id": "1", "article_id": "1", "content": "评论1", "status": "1" },
    { "user_id": "2", "article_id": "2", "content": "评论2", "status": "0" },
    { "user_id": "3", "article_id": "3", "content": "评论3", "status": "1" },
    { "user_id": "4", "article_id": "4", "content": "评论4", "status": "0" },
    { "user_id": "5", "article_id": "5", "content": "评论5", "status": "1" }
]
// 菜单数据
let menuJSON = [
    { "parentId": "0", "type": "1", "icon": "search", "name": "菜单一", "sort": 1, "component": "/components/components" },
    { "parentId": "0", "type": "1", "icon": "search", "name": "菜单二", "sort": 2, "component": "/components/components" },
    { "parentId": "0", "type": "1", "icon": "search", "name": "菜单三", "sort": 3, "component": "/components/components" },
    { "parentId": "0", "type": "1", "icon": "search", "name": "菜单四", "sort": 4, "component": "/components/components" },
    { "parentId": "0", "type": "1", "icon": "search", "name": "菜单五", "sort": 5, "component": "/components/components" },
]
// 角色数据
let roleJSON = [
    { "name": "超级管理员", "type": "1", "sort": 1},
]


admin.bulkCreate(adminJson);
user.bulkCreate(memberJSON);
column.bulkCreate(columnJSON);
article.bulkCreate(articleJSON);
tab.bulkCreate(tabJSON);
comment.bulkCreate(commentJSON);
menu.bulkCreate(menuJSON);
role.bulkCreate(roleJSON);
